home *** CD-ROM | disk | FTP | other *** search
- scenario = GetProperties()
- scenario.ScenarioType = 1
- scenario.Title = "sc_Train_04_00"
- scenario.Map = "Beotorum.dat"
- scenario.Description = "sc_Train_04_01"
- scenario.Picture = "Train 04.dds"
-
- scenario.iSortOrder = 7
-
- scenario.vShowMessageBoxes[STDDT_AUTOFINISH_GUERILLA] = false
- scenario.vShowMessageBoxes[STDDT_AUTOFINISH_COMBAT] = false
- scenario.vShowMessageBoxes[STDDT_COMBAT_PHASE] = false
- scenario.vShowMessageBoxes[STDDT_YOU_CAPTURED_CAPITAL] = false
- scenario.vShowMessageBoxes[STDDT_YOU_CLEARED_TERRITORY] = false
- scenario.vShowMessageBoxes[STDDT_ENEMY_CLEARED_TERRITORY] = false
- scenario.vShowMessageBoxes[STDDT_YOU_CAPTURED_COUNTRY] = false
- scenario.vShowMessageBoxes[STDDT_ENEMY_CAPTURED_COUNTRY] = false
- scenario.vShowMessageBoxes[STDDT_GUERILLA] = false
-
- Player(PT_PLAYER, RACE_HUMANS)
- Player(PT_AI, RACE_ALIENS)
-
- SetInitialCamera(-0.999799, 0.000000, -0.020020, 0.000000, 0.019510, 0.224254, -0.974335, 0.000000, 0.004490, -0.974531, -0.224208, 0.000000, 1663.104248, 475.652863, -1188.297974, 1.000000)
-
- function InitialMOB()
- StartMOB(1)
-
- ShowBallon(1, -1, MBS_CENTER, 26, 36, "sc_Train_04_02a")
- SelectCountry(2)
- ShowBallon(1, -1, MBS_CENTER, 26, 36, "sc_Train_04_02")
- UnselectCountry(2)
-
- FlyCamera(0.999754, 0.000000, -0.022175, 0.000000, 0.020990, 0.322563, 0.946315, 0.000000, 0.007153, -0.946548, 0.322483, 0.000000, 1816.183472, 385.874878, -1654.376465, 1.000000)
- SelectUnit2(1)
- SelectUnit2(2)
- SelectUnit2(3)
- SelectUnit2(4)
- ShowBallon(2, -1, MBS_LEFT, 28, 42, "sc_Train_04_03")
-
- FlyCamera(0.999856, -0.000000, -0.016959, 0.000000, 0.016917, 0.070778, 0.997349, 0.000000, 0.001200, -0.997492, 0.070767, 0.000000, 1727.739746, 387.422821, -1454.318726, 1.000000)
- MoveUnit(1, 25, 41)
- MoveUnit(2, 26, 42)
- MoveUnit(3, 27, 43)
- MoveUnit(4, 28, 42)
- ShowBallon(3, -1, MBS_CENTER, 29, 41, "sc_Train_04_04")
-
- UnselectUnit(1)
- UnselectUnit(2)
- UnselectUnit(3)
- UnselectUnit(4)
-
- MoveUnit(1, 25, 37)
- MoveUnit(2, 26, 38)
- MoveUnit(3, 27, 39)
- MoveUnit(4, 28, 38)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_04_05")
-
- FlyCamera(-0.999052, 0.000000, -0.043522, 0.000000, 0.041621, 0.292318, -0.955415, 0.000000,0.012722, -0.956321, -0.292040, 0.000000,1658.933228, 341.057404, -1177.537720, 1.000000)
-
- ShowBallon(51, -1, MBS_CENTER, 26, 32, "sc_Train_04_06")
- ShowBallon(51, -1, MBS_CENTER, 26, 32, "sc_Train_04_06b")
-
- ShowBallon(51, -1, MBS_CENTER, 26, 32, "sc_Train_04_07")
-
- SelectUnit2(1)
- SelectUnit2(4)
- ShowBallon(51, -1, MBS_CENTER, 26, 32, "sc_Train_04_08")
- --ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_04_08")
- UnselectUnit(1)
- UnselectUnit(4)
-
- FinishMOB()
- end
-
- old_prompt = ""
-
- function OnUpdate()
- if GetGamePhase() == PHASE_GUERRILLA then
- if GetMoney(2, MONEY_GUERRILLA) > 0 then
- if GetSelectedCountry() == 0 then
- ShowPrompting("sc_Train_04_09")
- else
- ShowPrompting("sc_Train_04_10")
- end
- end
- elseif not AllUnitsMovedAndFiredIfCould() then
- ShowPrompting("sc_Train_04_11")
- end
-
- if not HasPrompting() then
- ShowPrompting("sc_Train_finish_phase")
- end
- end
-
- function OnHexClicked(x, y, clicked_unit, selected_unit, command)
- if command == CMD_SETUP then
- if GetType(selected_unit) ~= LBOT then
- IncorrectAction("sc_Train_04_13")
- return
- end
-
- local bEnemyNearby = false
-
- for enemy = 1, 4 do
- if GetDistance(selected_unit, enemy) <= GetMaxWR(selected_unit) then
- bEnemyNearby = true
- end
- end
-
- if not bEnemyNearby then
- IncorrectAction("sc_Train_04_14")
- end
- end
- end
-
- function OnCountryInvaded(country, color)
- if(country == 1 and color == COLOR_GREEN) then
- IncorrectAction("sc_Train_04_15")
- end
- end
-
- function OnCountryCaptured(country, color)
- if(country == 2 and color == COLOR_GREEN) then
- StartMOB(1)
- -- FlyCamera(-0.999249, 0.000000, 0.038752, 0.000000, -0.033416, 0.506388, -0.861658, 0.000000,-0.019624, -0.862306, -0.506008, 0.000000,1662.984253, 313.746216, -1270.524658, 1.000000)
- --FlyCamera(-0.984889, 0.000000, -0.173187, 0.000000, 0.076259, 0.897837, -0.433674, 0.000000,0.155494, -0.440328, -0.884270, 0.000000,1658.933228, 231.031357, -1177.537720, 1.000000)
- FlyCamera(-0.996527, -0.000000, -0.083273, 0.000000, 0.011524, 0.990378, -0.137906, 0.000000,0.082471, -0.138387, -0.986938, 0.000000,1735.486938, 106.910278, -1197.580078, 1.000000)
-
- ShowXBallon(51, -1, MBS_CENTER, 313, 546, "sc_Train_04_12")
- FinishMOB()
- end
- end
-
- function aiInvasion(country)
- if (country == 1) then
- aiMustNot()
- end
- end
-
- function aiDefence(country)
- if (country == 2) then
- aiMustNot()
- end
- end
-
- function CheckForVictory()
- if(GetAliveUnitsAmount(COLOR_RED) == 0) then return GAMERESULT_VICTORY end
- if(GetCountryControl(2) == COLOR_RED) then return GAMERESULT_DEFEAT end
- return GAMERESULT_NONE
- end
-
- function InitialSetup()
- Country(1, ALLIANCE_FL_ALLY)
- Money(1, MONEY_TOTAL_REVENUE, 0)
-
- Country(2, ALLIANCE_NEUTRAL)
- PlaceCapital(2, 26, 32)
-
- SetupUnit(1, TANKA, 25, 45)
- SetupUnit(2, TANKA, 26, 46)
- SetupUnit(3, TANKA, 27, 45)
- SetupUnit(4, TANKA, 28, 46)
-
- SetHP(1, 3)
- SetHP(4, 3)
- end
-